<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.sailorj.medical.domain.family_member.Family_member" %>
<%@ include file="/common/base.jsp"%>

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">

<title>家庭档案信息列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jquery-1.4.4.min.js"></script>
<script src="js/admin.js"></script>
	<script src="other/layui/layui.all.js"></script>
	<link rel="stylesheet" href="other/layui/css/layui.css">
	<script type="text/javascript">
		$(document).ready(function() {
			//重新绑定表单提交
			$("#add_btn").bind("click", function() {
				// $('form').submit();
				layer.confirm("确定修改该数据？",{
					btn: ['确定', '取消']
				}, function () {
					$('form').submit();
				}, function(){
					layer.closeAll();
				});

			});
		});
	</script>

</head>
<body>
	<form method="post" action="" id="listform">
		<div class="panel admin-panel">
			<div class="panel-head">
				<strong class="icon-reorder">参合人员档案信息列表</strong>
			</div>
			<div class="padding border-bottom">
				<ul class="search" style="padding-left:10px;">
					<li><a class="button border-main icon-plus-square-o"
						href="<%=path%>/biz/Family_memberServlet?m=input"> 添加参合人员档案信息</a></li>
					<li>搜索：</li>
					<li><input type="text" placeholder="请输入搜索关键字" name="keywords"
						class="input"
						style="width:250px; line-height:17px;display:inline-block" /> <a
						href="javascript:void(0)" class="button border-main icon-search"
						onclick="changesearch()"> 搜索</a></li>
				</ul>
			</div>
			<table class="table table-hover text-center">
				<tr>	<th width="50">序号</th>
					<th width="20" style="text-align:center;">&nbsp;</th>
					<th>家庭编号</th>
					<th>农合证号</th>
					<th>医疗证卡号</th>
					<th>姓名</th>
					<th>性别</th>
					<th>年龄</th>
					<th>与 户 主 关系</th>
					<th>身份证号</th>
					<th>登记员</th>
					<th>操作</th>
				</tr>
				<%
					String pageNo = request.getParameter("pageNo");
					int p = pageNo == null ? 1 : Integer.parseInt(pageNo);
					Family_memberDAO dao = new Family_memberDAO();
					String sql = "select * from t_family_member where 1=1 ";
					Object[] params = {};
					Page pageBean = dao.queryOjectsByPage(sql, params, p,
							Constant.ROW);
				%>
				<%
					for (int i = 0; i < pageBean.getDatas().size(); i++) {

						Family_member model= (Family_member) pageBean.getDatas().get(i);
						
				%>
				<tr>
				<td><%=(i+1) %></td>
					<td><input type="checkbox" name="ids" value="<%=model.getJoin_nh_code()%>" /></td>
					<td><%=model.getFamilycode() %></td>
					<td><%=model.getJoin_nh_code()%></td>
					<td><%=model.getMedicalCard() %></td>
					<td><%=model.getMembername() %></td>
					<td><%=model.getSex() %></td>
					<td><%=model.getAge()%></td>
					<td><%=model.getRelation() %></td>
					<td><%=model.getIDcard() %></td>
					<td><%=model.getUserid() %></td>
					
					<td>
						<div class="button-group">
							<a class="button border-green" href="<%=path%>/biz/Family_memberServlet?m=getDetails&id=<%=model.getJoin_nh_code()%>"><span class="icon-edit"></span>详情</a>
							<a class="button border-main" href="<%=path%>/biz/Family_memberServlet?m=get&id=<%=model.getJoin_nh_code()%>"><span class="icon-edit"></span> 修改</a> 
							<a class="button border-red" href="<%=path%>/biz/Family_memberServlet?m=del&id=<%=model.getJoin_nh_code()%>"><span class="icon-trash-o"></span> 删除</a>
<%--							<a class="button border-red" href=" " onclick="del(this,<%=model.getJoin_nh_code()%>)">--%>
<%--								<span class="icon-trash-o"></span> 删除</a>--%>
						</div>
				   </td>
				</tr>
				<%
					}
				%>
			</table>
			<div class="pagelist">
				<%
					if (pageBean.hasPre()) {
				%>
				<a
					href="<%=path%>/biz/Family_memberServlet?m=list&pageNo=<%=pageBean.prePage()%>">上一页</a>
				<%
					} else {
				%>
				<a href="javascript:void(0)">上一页</a>
				<%
					}
				%>
				<%
					List<Integer> linkNums = pageBean.linkLumbers();
					for (int num : linkNums) {
					if (pageBean.isCurrent(num)) {
				%>
				<span class="current"><%=num%></span>
				<%
					} else {
				%>
				<a href="<%=path%>/biz/Family_memberServlet?m=list&pageNo=<%=num%>"><%=num%></a>
				<%
					}
					}
				%>
				<%
					if (pageBean.hasNext()) {
				%>
				<a
					href="<%=path%>/biz/Family_memberServlet?m=list&pageNo=<%=pageBean.lastPage()%>">下一页</a>
				<%
					} else {
				%>
				<a href="javascript:void(0)">下一页</a>
				<%
					}
				%>
				<a
					href="<%=path%>/biz/Family_memberServlet?m=list&pageNo=<%=pageBean.getPages()%>">尾页</a>
			</div>
		</div>
	</form>

</body>
</html>
